/* 
 * @author Michael Azzopardi (mazzopar@andrew.cmu.edu)
 */

package com.eep.security;

/**
 *
 * @author michael
 */
public class Session {
    private String username;
    private String password; // Note that this implementation has plain text pwd
    private Applications applicationId;
    private SecurityStatus status;

    public enum Applications {
        Orders, // EEP Order Application
        Shipping, // EEP Shipping Application
        Inventory,  // EEP Inventory Application
        Administration // EEP Administrative Tools
    }

    public enum SecurityStatus {
        authenticated, //username and password correct
        unkownUser, // username not found
        invalidPassword, // password for username does not match
        applicationAccessGranted, // session authorized (must be authenticated)
        applicationAccessDenied // session not authorized (must be authenticated)
    }

    public void setApplicationId(Applications applicationId) {
        this.applicationId = applicationId;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Applications getApplicationId() {
        return applicationId;
    }

    public String getPassword() {
        return password;
    }

    public String getUsername() {
        return username;
    }

    public SecurityStatus getStatus() {
        return status;
    }

    public void setStatus(SecurityStatus status) {
        this.status = status;
    }


}
